package com.fit.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.interfaces.Damage;
import com.fit.interfaces.User;
import com.fit.service.Damages;

public class ViewDamage {

	@SessionState
	private User user;
	
	@Persist
	private String passedId;
	
	private boolean userExists;
	
	public User getUser(){
		return user;
	}
	
	public Object onActivate(){
		if(!userExists) return Login.class;
			return null;
	}
	@Property
	@Inject
	private Damages damages;
	
	
	@Property
	private Damage chosenDamage;
}
